<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/common/commonCss.jsp"/>
<jsp:include page="/common/commonJs.jsp"/>
<script language="javascript" src="${basePath }commonJs/tags/My97DatePicker/WdatePicker.js"></script>
<script language="javascript" src="${basePath }commonJs/quinn_commons.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	reprotTitle();
	$("#exportBtn").click(function() {
		$.messager.confirm('提示', '确定要导出吗？', function(r) {
			if (r) {
				$("#exportTime").val($("#searchTime").val());
				$("#exportForm").submit();
			}
		});
	});
	
	$("#searchBtn").click(function() {
		$("#searchForm").submit();
	});
});

function reprotTitle(){
	var time = $("#searchTime").val().replace('/','.');
	$("#reportTitle").html('<b>'+time+' 派对团体统计</b>');
}
function go() {
	window.location.href = "${basePath}report/jump.shtml?key=" + $("#report_type").val();
}
</script>
<title>Insert title here</title>
</head>
<body class="bg">

<div class="content m_auto">
	<%@include file="reprot_tab.jsp"%>
    <div class="content_r mt10">
    <div class="tab_normal m10">
    <div class="file_single_dl f14 fixed">
			<br />
			<form action="${basePath}report/jump.shtml" method="get" id="searchForm" name="searchForm">
			<dl style="overflow:hidden" class="fixed">
				<dd>
					<label>报表类型：</label>
					<div class="uboxstyle">
						<select name="reportName" id="report_type" onchange="go()">
							<option value="dailyIncome">日常收益报表</option>
							<option value="membershipSale">会籍销售统计报表</option>
							<option value="membership">会籍统计报表</option>
							<option value="partyOrGroup" selected = "selected">派对团体统计报表</option>
							<option value="scmCount">进场人数统计报表</option>
							<option value="membershipProfit">会籍利润报表</option>
							<option value="membershipValue">会员储值报表</option>
							<option value="partyPrepaid">派对预付报表</option>
							<option value="failureMember">会员失效报表</option>
						</select>
					</div>
				</dd>
				<dd><label>日期：</label>
					<input type="text" readonly="readonly" class="Wdate iput_t w82" onclick="WdatePicker({dateFmt:'yyyy.MM.dd ',isShowWeek:true,isShowClear:true,readOnly:true})" id="searchTime" name="searchTime" title="" value="${reportParam.searchTime }"/>
				</dd>
			</dl>
			</form> 
			<div>
            	<input type="button" id="searchBtn" class="btn fr m010" value="查询" onclick="select11();" />
            	<form action="${basePath}report/export.shtml" method="post" id="exportForm" name="exportForm">
            		<input type="hidden" name="reportName" value="partyOrGroup"/>
            		<input type="hidden" name="searchTime" id="exportTime" />
            		<input type="button" id="exportBtn" class="btn fr m010"  value="导出" />
            	</form>
             </div>
		</div>
		<br />
    	
    <br />
    		<div id="reportTitle" style="text-align:center;font-size:18px;font-weight:blod;"></div><br />
			<div style="text-align:center;font-size:12px;font-weight:blod;"><b>统计时间：${countedTime} 统计人：${countedUser }</b></div><br />
			<table class="table" id="table1">
				<tr>
					<td>类型</td>
					<td>日数量</td>
					<td>日客人数量</td>
					<td>月数量</td>
					<td>月客人数量</td>
					<td>年数量</td>
					<td>年客人数量</td>
				</tr>
				<c:forEach items="${reportParam.results }" var="pg" varStatus="i">
					<c:set var="sum1" value="${sum1+pg.dayCount }"></c:set>
					<c:set var="sum2" value="${sum2+pg.daySumCount }"></c:set>
					<c:set var="sum3" value="${sum3+pg.monthCount }"></c:set>
					<c:set var="sum4" value="${sum4+pg.monthSumCount }"></c:set>
					<c:set var="sum5" value="${sum5+pg.yearCount }"></c:set>
					<c:set var="sum6" value="${sum6+pg.yearSumCount }"></c:set>
					<tr>
						<td>${pg.name }</td>
						<td>${pg.dayCount }</td>
						<td>${pg.daySumCount }</td>
						<td>${pg.monthCount }</td>
						<td>${pg.monthSumCount }</td>
						<td>${pg.yearCount }</td>
						<td>${pg.yearSumCount }</td>
					</tr>
				</c:forEach>
				<c:if test="${reportParam.results.size()>0 }">
					<tr>
						<td>合计</td>
						<td>${sum1 }</td>
						<td>${sum2 }</td>
						<td>${sum3 }</td>
						<td>${sum4 }</td>
						<td>${sum5 }</td>
						<td>${sum6 }</td>
					</tr>
				</c:if>
			</table>
			</div>
</div>
</div>
</body>
</html>